<!DOCTYPE html>
<html>
    <head>
        <title>SISCO - Actualizar producto</title>

        {include file="head_scripts.html"}
    </head>

    <body>

        {include file="header.html"}

        <div class="container">
            {include file="messages.html"}
            
            {if (true)}
<div id="" class="row">
	

                    {if (true)}
<div id="" class="span3">
	
                            {include file="producto_sidebar.html"}
                        
</div>
{/if}

                    {if (true)}
<div id="" class="span9">
	
                            {if (true)}
<form id="" class="" action="" method="post" enctype="multipart/form-data">
	
                                    <legend >Actualizar producto</legend>

                                    
                                    {if (true)}
<label for="descripcion">Descripción</label>
<input id="descripcion" name="descripcion" type="text" value="{$producto->descripcion}" placeholder="ej. Leche entera"  />
{/if}
                                    {if (true)}
<label for="ean13">Código EAN-13</label>
<input id="ean13" name="ean13" type="text" value="{$producto->ean13}" placeholder="ej. 7793940108006"  />
{/if}
                                    {if (true)}
<label for="codigo_interno">Código interno</label>
<input id="codigo_interno" name="codigo_interno" type="text" value="{$producto->codigo_interno}" placeholder="ej. 0"  />
{/if}
                                    {if (true)}

{if ({$producto->loteable})}
<label for="loteable" class="checkbox">
	<input name="loteable" type="hidden" value="0" /> 
	<input id="loteable" name="loteable" type="checkbox" value="1" checked="checked"> Es loteable?
</label>
{else}
<label for="loteable" class="checkbox">
	<input name="loteable" type="hidden" value="0" />
	<input id="loteable" name="loteable" type="checkbox" value="1"> Es loteable?
</label>
{/if}

{/if}
                                    
                                    <label >Marca</label>

                                    {if (true)}
<select name="marca">
	<option value="0">Please select something</option> 
{foreach from=$marcas item="marca"}
	
	{if ($producto->marca->id == $marca->id)}
		<option value="{$marca->id}" selected="selected">{$marca->nombre}</option>
	{else}
		<option value="{$marca->id}">{$marca->nombre}</option>
	{/if}

{/foreach}
</select>
{/if}
                                    
                                    <label >Categoria</label>

                                    {if (true)}
<select name="categoria">
	<option value="0">Please select something</option> 
{foreach from=$categorias item="categoria"}
	
	{if ($producto->categoria->id == $categoria->id)}
		<option value="{$categoria->id}" selected="selected">{$categoria->nombre}</option>
	{else}
		<option value="{$categoria->id}">{$categoria->nombre}</option>
	{/if}

{/foreach}
</select>
{/if}
                                    
                                    <label >Origen</label>

                                    {if (true)}
<select name="origen">
	<option value="0">Please select something</option> 
{foreach from=$origenes item="origen"}
	
	{if ($producto->origen->id == $origen->id)}
		<option value="{$origen->id}" selected="selected">{$origen->nombre}</option>
	{else}
		<option value="{$origen->id}">{$origen->nombre}</option>
	{/if}

{/foreach}
</select>
{/if}
                                    
                                    <label >Medida</label>

                                    {if (true)}
<select name="medida">
	<option value="0">Please select something</option> 
{foreach from=$medidas item="medida"}
	
	{if ($producto->medida->id == $medida->id)}
		<option value="{$medida->id}" selected="selected">{$medida->nombre}</option>
	{else}
		<option value="{$medida->id}">{$medida->nombre}</option>
	{/if}

{/foreach}
</select>
{/if}
                                    
                                    
                                    {if (true)}
<div id="" class="form-actions">
	
                                            <button id="" name="" type="submit" class='btn btn-primary'>Actualizar</button>

                                            <a id="" name="" href="productos/delete/{$producto->id}/" class='btn btn-danger'>Eliminar</a>

                                        
</div>
{/if} <!-- .form-actions -->

                                
</form>
{/if} <!-- form -->

                        
</div>
{/if} <!-- .span9 -->

                
</div>
{/if} <!-- .row -->

            {include file="footer.html"}
        </div><!-- .container -->

        {include file="footer_scripts.html"}
        
    </body>
</html>